#
# Be sure to run `pod lib lint MediaSDK-iOS.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#

Pod::Spec.new do |s|
    s.name             = 'MediaSDK-iOS'
    s.version          = '0.4.0'
    s.summary          = 'Media SDK For iOS'
    
    # This description is used to generate tags and improve search results.
    #   * Think: What does it do? Why did you write it? What is the focus?
    #   * Try to keep it short, snappy and to the point.
    #   * Write the description between the DESC delimiters below.
    #   * Finally, don't worry about the indent, CocoaPods strips it!
    
    s.description      = 'Media SDK For iOS Can Record And Edit Video/Image'
    
    s.homepage         = 'https://git.work.yunyugz.com/AVMediaSDK/MediaSDK-IOS'
    # s.screenshots     = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
    s.license          = { :type => 'MIT', :file => 'LICENSE' }
    s.author           = { 'huangyq' => 'huangyq@yunyugz.com' }
    s.source           = { :git => 'https://git.work.yunyugz.com/AVMediaSDK/MediaSDK-IOS.git', :tag => s.version.to_s }
    # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
    
    s.ios.deployment_target = '10.0'
    
    s.swift_version = '5.0'
    
    # 源文件
    s.source_files = 'MediaSDK-iOS/Classes/**/*.{h,m,mm,swift}'
    
    # pch文件
    s.prefix_header_contents = '#import "MediaSDK-Header.h"'
    
    # 资源Bundle
    s.resource_bundles = {
        'MediaSDK-iOS' => ['MediaSDK-iOS/Assets/*']
    }
    
    # 需要暴露出去的头文件
    #   s.public_header_files = 'Pod/Classes/**/*.h'
    
    # Pod Target配置
    s.pod_target_xcconfig = {
        # This is needed by all pods that depend on Protobuf:
        'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1',
        # This is needed by all pods that depend on gRPC-RxLibrary:
        'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES',
        # .a库的头文件引用路径
        'USER_HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/../../MediaSDK-iOS/Classes/MediaSDKCore/Lib/ltFFmpeg/include/CRMedia" "${PODS_ROOT}/../../MediaSDK-iOS/Classes/MediaSDKCore/Lib/ltFFmpeg/include/libCRBase"',
        # 是否开启Bitcode
        'ENABLE_BITCODE' => 'NO',
        'VALID_ARCHS' => 'x86_64 arm64 arm64e',
        # 解决pod lib lint/repo push不支持i386编译，同时使用pod lib lint/repo push  --skip-import-validation
        'VALID_ARCHS[sdk=iphonesimulator*]' => ''
    }
    
    # 手动引进来的第三方Framework
    s.vendored_frameworks = 'MediaSDK-iOS/Classes/MediaSDKCore/Lib/mobile-ffmpeg-framework/*.framework'
    # 手动引进来的第三方.a文件
    s.vendored_libraries = 'MediaSDK-iOS/Classes/MediaSDKCore/Lib/ltFFmpeg/lib/*.a'
    # 忽略的文件夹路径
    s.exclude_files = 'MediaSDK-iOS/Classes/MediaSDKCore/Lib/**/*.h'
    # 依赖的系统库
    s.libraries = 'c++', 'z', 'iconv'
    # 依赖的系统Framework
    s.frameworks = 'VideoToolbox', 'CoreMedia'   #'UIKit', 'MapKit'
    
    # 依赖第三方Pod库
    s.dependency 'SVGAPlayer'
    s.dependency 'GPUImage'
    s.dependency 'SnapKit'
    s.dependency 'TYPagerController'
    s.dependency 'SDWebImage'
end
